package com.ruoyi.ipms_patent.mapper;

/* 案件mapper */

import com.ruoyi.ipms_patent.dto.ContractCaseDto;
import com.ruoyi.ipms_patent.dto.IpmsCaseBaseInfo;
import com.ruoyi.ipms_patent.entity.IpmsCase;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Set;

/* 案件Mapper */

@Mapper
public interface IpmsCaseMapper {

    /* 基于用户角色查找其能获取的案件列表 */
    List<IpmsCase> selectCaseByuserId(@Param("ipmsCase") IpmsCase ipmsCase, @Param("caseStatus") Set<String> caseStatus);

    /* 案件新增 */
    int insertCase(IpmsCase ipmsCase);

    /* 案件修改 */
    int updateCase(@Param("ipmsCase") IpmsCase ipmsCase, @Param("caseNos") List<String> caseNos);

    /* 案件删除 by案件id--修改状态*/
    int delCaseByCaseNo(@Param("caseNos") List<String> caseNos);



    /******************模拟官方审核 *************************/

    /* 查找已提交官方案件*/
    List<Integer> selectCaseToOfficial();

    /* 模拟官方回复后修改状态 */
    int officialReply(@Param("caseId") int caseId, @Param("caseStatusId") String caseStatusId,@Param("caseReasonsRejection") String caseReasonsRejection);

    /* 案件id找客户id和合同id */
    ContractCaseDto findContractCaseId(int caseId);
}
